---
import { getCollection } from 'astro:content'
import Testimonial from './Testimonial.astro'

const testimonials = await getCollection('testimonials')

interface Props {
  class?: string
}
---

<div class:list={['columns-1 gap-6 md:columns-2 lg:columns-3', Astro.props.class ?? '']}>
  {
    testimonials.map((testimonial) => {
      return <Testimonial testimonial={testimonial} />
    })
  }
</div>
